package com.io.examples_shili;
import java.io.*;
public class Sl4_FileOutputStream {
	public static void main(String[] args) throws IOException {
		FileOutputStream fos = null;
		try {
				String str = "�ú�ѧϰ Java";
				byte[] words = str.getBytes();//�ֽ�����
				//����������, ��׷�ӷ�ʽд���ļ�s
				fos = new FileOutputStream("D:\\ѧϰ\\��ʹ��Javaʵ����������̡�\\hello.txt",true);
				//д���ļ�
				fos.write(words, 0, words.length);
				System.out.println("hello�ļ��Ѹ��� !");
		} catch (IOException e) {
				System.out.println("�����ļ�ʱ���� !");
				//e.printStackTrace();
		}finally {
				try {
					if( fos!=null){
						fos.close();
					}
				} catch (IOException e) {
					e.printStackTrace();
				}
		}
		
}
}
